import Vue from 'vue'
import Vuex from 'vuex'
import VuexPersistence from 'vuex-persist'

Vue.use(Vuex)
const vuexLocal = new VuexPersistence({
  storage: window.localStorage
})
export default new Vuex.Store({
  plugins: [vuexLocal.plugin],
  state: {
    youdianda_token: ''
  },
  mutations: {
    updateToken (state, val) {
      state.youdianda_token = val
    }
  }
})
